package com.liz.rpcserver.commons;

import com.liz.lizrpcapi.commons.Node;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author liangGongWei
 * @description GlobalHolder
 * @create 2021-08-23 22:27
 **/
@Component
public class GlobalHolder {
    /**
     * key:className;
     * value: clientId 的set
     */
    public static Map<String, Set<String>> providerClientMap = new HashMap<>();


    /**
     * key:className#methodName
     * value:clientId 的set
     */
    public static Map<String, Set<String>> providerMethodMap = new HashMap<>();

    /**
     * 保存class节点
     * key:     className
     * value:   map:
     *                  key: clientId
     *                  value:Node
     */
    public static Map<String, Map<String,Node>> classNodeMap = new ConcurrentHashMap<>();

}
